class Stack(object):
   
    def __init__(self,start=[]):
        self.stack = []
        for x in start: 
            self.push(x)
        

    def pop(self):
        return self.stack.pop()

    def push(self,object):
        return self.stack.append(object)

    
    def length(self):
        return len(self.stack)
    
    def top(self):
        temp = self.stack.pop()
        self.stack.append(temp)
        return temp

a= Stack([1,2,3])
a.push(4)
print a.length()
print a.top()